{extend name="layout/common_layout" /}
{block name="body"}
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">规格管理</li>

        </ul>
        <div class="layui-tab-content">

            <form class="layui-form layui-form-pane" action="{:url('admin/spec/addSpec')}" method="get">


                <div class="layui-inline">
                    <label class="layui-form-label">规格</label>
                    <div class="layui-input-inline">
                        <input type="text" name="name" value="" placeholder="请输入规格" required class="layui-input">
                        <input type="hidden" name="cate2_id" value="{$cate2_id}"  class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <button class="layui-btn">增加</button>
                </div>
            </form>
            <hr>

            <form action="" method="post" class="ajax-form">

                <!--<button type="button" class="layui-btn layui-btn-danger layui-btn-small ajax-action" data-action="{:url('admin/article/delete')}">删除</button>-->
                <div class="layui-tab-item layui-show">
                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th style="width: 15px;"><input type="checkbox" class="check-all"></th>
                            <th style="width: 30px;">ID</th>
                            <th>名称</th>
                            <th>时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach name="list" item="vo"}
                        <tr>
                            <td><input type="checkbox" name="ids[]" value="{$vo.id}"></td>
                            <td>{$vo.id}</td>
                            <td>{$vo.name}g</td>
                            <td>{$vo.ctime|date='Y-m-d',###}</td>
                            <td>
                                <a href="{:url('admin/spec/delSpec',['id'=>$vo['id']])}" class="layui-btn layui-btn-danger layui-btn-mini ajax-delete">删除</a>
                            </td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                </div>
            </form>
        </div>
    </div>
{/block}